Skip to content

fix: don't convert - to 减 in non-math context - #347

Merged
pengzhendong merged 3 commits into
masterfrom
fix/dash-not-minus
Jun 9, 2026
Merged

fix: don't convert - to 减 in non-math context#347
pengzhendong merged 3 commits into
masterfrom
fix/dash-not-minus

Conversation

@pengzhendong

Copy link
Copy Markdown
Member

Closes #294

Summary

Split math operators into ambiguous (-, +, =) and unambiguous (×, ÷, , , >=, <=). Ambiguous operators now require number context on both sides. Unambiguous operators can still match independently.

Examples

Input Before After
wide-awake wide减awake wide-awake
整体-表现非常好 整体减表现非常好 整体-表现非常好
10-3=7 十减三等于七 十减三等于七
当场票数≥100万 当场票数大于等于一百万 当场票数大于等于一百万

Test plan

  • All 1400 unit tests pass
  • CI passes

Split math operators into ambiguous (-, +, =) and unambiguous (×, ÷,
≥, ≤, etc.). Ambiguous operators now require number context on both
sides. Unambiguous operators can still match independently.

Before: wide-awake => wide减awake
After: wide-awake => wide-awake
@pengzhendong
pengzhendong merged commit 6ee1abd into master Jun 9, 2026
1 check passed
@pengzhendong
pengzhendong deleted the fix/dash-not-minus branch June 9, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

符号"-"的badcase

1 participant